home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / VOXRAY.ZIP / BLOCKMAP.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-23  |  937 b   |  35 lines

  1. #ifndef _BLOCKMAP_
  2. #define _BLOCKMAP_
  3. #include "ray.h"
  4.  
  5. #define BLOCK_MAP_Y_SHIFT 7
  6. #define BLOCK_MAP_X_SHIFT 7
  7. #define BLOCK_MAP_X_SIZE 128
  8. #define BLOCK_MAP_Y_SIZE 128
  9. #define BLOCK_MAP_X_AND 0xff80
  10. #define BLOCK_MAP_Y_AND 0xff80
  11. #define MAX_LINES_PER_BLOCK 50
  12.  
  13. typedef struct LINE_LIST {
  14.   short line_count;
  15.   plinedef * lines;
  16.   } line_list;
  17.  
  18. typedef line_list * pline_list;
  19.  
  20. line_list * Get_Block_Line_List(USHORT block_x, USHORT block_y);
  21. pobject_node * Get_Block_Obj_List(USHORT block_x, USHORT block_y);
  22. line_list * Get_Line_List(long x, long y);
  23. void Generate_Block_Map();
  24. void Clear_Block_Map();
  25. short Block_X(long real_x);
  26. short Block_Y(long real_y);
  27. long Block_Left_Line(long base_x);
  28. long Block_Right_Line(long base_x);
  29. long Block_Top_Line(long base_y);
  30. long Block_Bottom_Line(long base_y);
  31. BOOL In_Block_X(long real_x, short block_x);
  32. BOOL In_Block_Y(long real_y, short block_y);
  33.  
  34. #endif
  35.